{% extends "common/layout_main.html" %}
{% block content %}
    {% include "common/tab_stat.html" %}
    <div class="row m-t">
        <div class="col-lg-12 m-t">
            <form class="form-inline" id="search_form_wrap">
                <div class="row p-w-m">
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" placeholder="请选择开始时间" name="date_from" class="form-control"
                                   value="{{ search_con['date_from'] }}">
                        </div>
                    </div>
                    <div class="form-group m-r m-l">
                        <label>至</label>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" placeholder="请选择结束时间" name="date_to" class="form-control"
                                   value="{{ search_con['date_to'] }}">
                        </div>
                    </div>
                    <div class="form-group">
                        <a class="btn btn-w-m btn-outline btn-primary search">搜索</a>
                    </div>
                </div>
                <hr>
            </form>
            <table class="table table-bordered m-t">
                <thead>
                <tr>
                    <th>日期</th>
                    <th>美餐名称</th>
                    <th>当日销售数量</th>
                    <th>当日销售总额</th>
                </tr>
                </thead>
                <tbody>
                {% if list %}
                    {% for item in list %}
                        <tr>
                            <td>{{ item.date }}</td>
                            <td>{{ item.food_info.name }}</td>
                            <td>{{ item.total_count }}</td>
                            <td>{{ item.total_pay_money }}</td>
                        </tr>
                    {% endfor %}
                {% else %}
                    <tr>
                        <td colspan="2">暂无数据</td>
                    </tr>
                {% endif %}
                </tbody>
            </table>
            {% include 'common/pagenation.html' %}
        </div>
    </div>
{% endblock %}
{% block css %}
    <link href="{{ buildStaticUrl('/plugins/datetimepicker/jquery.datetimepicker.min.css') }}" rel="stylesheet">
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/plugins/datetimepicker/jquery.datetimepicker.full.min.js') }}"></script>
    <script src="{{ buildStaticUrl('/js/stat/product.js') }}"></script>
{% endblock %}